package co.edu.unal.satacredito.administration.view.general;

import java.io.IOException;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;


/**
 * Generic class to be used by the managed beans. It should be used by the beans
 * which require authentication
 * 
 * @author jhon
 * 
 */
public class AdministrationBean implements CommonBean {

	protected void doRedirect(String url) {
		try {
			ExternalContext externalContext = FacesContext.getCurrentInstance()
					.getExternalContext();
			externalContext.redirect(externalContext.getRequestContextPath()
					+ url);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	
}